package com.dongdongshop.service.impl;

import com.dongdongshop.mapper.TbUserMapper;
import com.dongdongshop.pojo.TbUser;
import com.dongdongshop.service.UserService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
@DubboService
public class UserServiceImpl implements UserService {

    @Resource
    private TbUserMapper tbUserMapper;

    @Override
    public TbUser getUser(String username) {
        return tbUserMapper.getUserName(username);
    }


    @Override
    public int insert(TbUser user) {
        return tbUserMapper.insertSelective(user);
    }
}
